Software application servers, examples of which include Oracle WebLogic Server (WLS) and GlassFish, generally provide a managed environment for running enterprise software applications. Recently, technologies have also been developed for use in cloud environments, which allow users or tenants to develop and run their applications within the cloud environment, and to take advantage of distributed resources provided by the environment.
Messaging services, for example, Java Message Service (JMS), can provide an application programming interface (API) that is usable in application server environments for sending messages between two or more clients.
JMS is a messaging standard that allows application components to create, send, receive, and read messages, allowing communication between different components of a distributed application to be loosely coupled, reliable, and asynchronous.
JMS can provide a unit-of-order extension that enables messages to be grouped into a unit-of-order (UOO). Messages with the same unit-of-order are required to be processed (consumed) in the same order in which they are submitted (produced). In a clustered environment honoring the unit-of-order, guarantee of ordered processing is enabled by routing all messages having a particular UOO name to the same member of in a JMS cluster. To achieve this, it is necessary to have a system for routing messages to the appropriate member of the cluster. One way to achieve the above routing effect is maintaining an in-memory map with a routing entry for each UOO, and persisting each routing entry to a persistence store.
However, for a dynamic JMS cluster, maintaining an in-memory map for each UOO can be problematic. For example, for routes recorded before the JMS cluster grows due to an elasticity decision, UOO messages using the routes can remain concentrated on the original running members and never be rebalanced to new members in the JMS cluster. Thus, additional cluster resources are not fully utilized.
Further, the in-memory map can use too much memory tracking each UOO individually when there is a large number of UOOs.
Furthermore, routing persisting can costly in terms of performance. Each new UOO requires at least one interaction with a persistence store, and a persisting operation, which increases the cost of messaging and causes performance issues.
Accordingly prior systems and methods for routing messages in a JMS cluster while satisfying UOO suffer from problems including poor resource utilization, poor scalability and high overhead. It would therefore be desirable to provide a system and method for routing messages in a JMS cluster which overcomes the problems of the prior art and improves the resource utilization and scalability while reducing overhead.